package lib

import (
	"goloader"
	"runtime"
)

// Ptrruntime 设置runtime库指针
func Ptrruntime(symPtr map[string]uintptr) {
	//runtime.cgoUse
	//runtime.mapdelete_fast64
	//runtime.cgoCheckPointer
	goloader.RegTypes(symPtr, runtime.Compiler, runtime.GOARCH, runtime.GOOS, runtime.MemProfileRate)
	goloader.RegFunc(symPtr, "runtime.BlockProfile", runtime.BlockProfile)
	goloader.RegFunc(symPtr, "runtime.Breakpoint", runtime.Breakpoint)
	goloader.RegFunc(symPtr, "runtime.CPUProfile", runtime.CPUProfile)
	goloader.RegFunc(symPtr, "runtime.Caller", runtime.Caller)
	goloader.RegFunc(symPtr, "runtime.Callers", runtime.Callers)
	goloader.RegFunc(symPtr, "runtime.GC", runtime.GC)
	goloader.RegFunc(symPtr, "runtime.GOMAXPROCS", runtime.GOMAXPROCS)
	goloader.RegFunc(symPtr, "runtime.GOROOT", runtime.GOROOT)
	goloader.RegFunc(symPtr, "runtime.Goexit", runtime.Goexit)
	goloader.RegFunc(symPtr, "runtime.GoroutineProfile", runtime.GoroutineProfile)
	goloader.RegFunc(symPtr, "runtime.Gosched", runtime.Gosched)
	goloader.RegFunc(symPtr, "runtime.KeepAlive", runtime.KeepAlive)
	goloader.RegFunc(symPtr, "runtime.LockOSThread", runtime.LockOSThread)
	goloader.RegFunc(symPtr, "runtime.MemProfile", runtime.MemProfile)
	goloader.RegFunc(symPtr, "runtime.MutexProfile", runtime.MutexProfile)
	goloader.RegFunc(symPtr, "runtime.NumCPU", runtime.NumCPU)
	goloader.RegFunc(symPtr, "runtime.NumCgoCall", runtime.NumCgoCall)
	goloader.RegFunc(symPtr, "runtime.NumGoroutine", runtime.NumGoroutine)
	goloader.RegFunc(symPtr, "runtime.ReadMemStats", runtime.ReadMemStats)
	goloader.RegFunc(symPtr, "runtime.ReadTrace", runtime.ReadTrace)
	goloader.RegFunc(symPtr, "runtime.SetBlockProfileRate", runtime.SetBlockProfileRate)
	goloader.RegFunc(symPtr, "runtime.SetCPUProfileRate", runtime.SetCPUProfileRate)
	goloader.RegFunc(symPtr, "runtime.SetCgoTraceback", runtime.SetCgoTraceback)
	goloader.RegFunc(symPtr, "runtime.SetFinalizer", runtime.SetFinalizer)
	goloader.RegFunc(symPtr, "runtime.SetMutexProfileFraction", runtime.SetMutexProfileFraction)
	goloader.RegFunc(symPtr, "runtime.Stack", runtime.Stack)
	goloader.RegFunc(symPtr, "runtime.StartTrace", runtime.StartTrace)
	goloader.RegFunc(symPtr, "runtime.StopTrace", runtime.StopTrace)
	goloader.RegFunc(symPtr, "runtime.ThreadCreateProfile", runtime.ThreadCreateProfile)
	goloader.RegFunc(symPtr, "runtime.UnlockOSThread", runtime.UnlockOSThread)
	goloader.RegFunc(symPtr, "runtime.Version", runtime.Version)
	goloader.RegFunc(symPtr, "runtime.CallersFrames", runtime.CallersFrames)
	goloader.RegFunc(symPtr, "runtime.FuncForPC", runtime.FuncForPC)
	goloader.RegTypes(symPtr, runtime.BlockProfileRecord{}, runtime.Frame{}, runtime.Frames{}, runtime.Func{}, runtime.MemProfileRecord{}, runtime.MemStats{}, runtime.StackRecord{}, runtime.TypeAssertionError{})
}
